package com.itheima_35;

import java.util.LinkedList;

public class ListDemo07 {
    public static void main(String[] args) {
        LinkedList<String> linkedList = new LinkedList<>();

        linkedList.add("hello");
        linkedList.add("world");
        linkedList.add("java");

        linkedList.addFirst("javaSE");
        linkedList.addLast("javaEE");

        System.out.println(linkedList.getFirst());
        System.out.println(linkedList.getLast());

        linkedList.removeFirst();
        linkedList.removeLast();

        System.out.println(linkedList);

    }
}
